//
//  NetworkEngine.h
//  QiuBaiDemo
//
//  Created by NO on 15/5/13.
//  Copyright (c) 2015年 lanouhn. All rights reserved.
//

#import <Foundation/Foundation.h>

@class NetworkEngine;


@protocol NetworkEngineDelegate <NSObject>
@optional

- (void)networkDidStartLoading:(NetworkEngine *)engine;//网络开始加载


- (void)networkDidFinishLoading:(NetworkEngine *)engine withInfo:(id)info;//网络结束加载 info是下载完成的数据



@end


@interface NetworkEngine : NSObject


//url将来要请求的网址，params是传进来的参数
+ (id)engineWithURL:(NSURL *)url parameters:(NSDictionary *)params
           delegate:(id<NetworkEngineDelegate>)delegate;


//设置请求方式GET/POST
//- (void)setHTTPType:(NSString *)method;

//开始请求
- (void)start;




@end
